Extensible Markup Language XML is a file format for representing data and a schema for describing data structure. XML is a simplified subset of the Standardized Generalized Markup Language (SGML). Generally, XML can be referred to as a meta-language: a language for describing languages. It allows programmers to define their own structures for data representation, using extensible tag-based elements. XML also falls under the category of markup or meta-markup languages, and is sometimes referred to as a document description language.
XML provides a uniform method for exchanging data in an open, text-based format. A wide variety of applications use XML to share data.
XML utilizes the concepts of elements and namespaces to define tree structures or hierarchies of data. The general syntax of XML and similar languages is rigid: adherence to the standardized format or syntax assures that XML-aware software can at least read and understand the relative arrangement of information within a given data structure.
XML “elements” are structural constructs that consist of a start tag, an end or close tag, and information or content contained between or within the tags. A start tag is formatted as <tagname> and an end tag is formatted as </tagname>. In an XML document, start and end tags can be nested within other start and end tags. Each element forms a node in this tree structure, and potentially has child or branch nodes. The child nodes represent any XML elements that occur between the start and end tags of the parent node.
Generally, data is contained in a document referred to as an XML document. The structure of the data is defined by an XML schema or schema document (or similar structure in other markup or tag-based languages). An XML schema includes legal building blocks of the XML document: element declarations, child elements, attributes, data types, whether the elements are empty or include any text, default and fixed values for elements and attributes, and so on. For example, standard data types such as strings, dates, date times, durations, time zones, decimals, numerics, integers, etc, may be used in an XML schema within new type declarations.
XML supports various “off-the-shelf” data types, and further data types are defined by the programmer in the XML schema. To use a data type, an element of that type is declared in the XML document and then instantiated. Instantiations of elements of given data types can be assigned values when created, and may subsequently be updated or removed.